
import VueRouter from 'vue-router'

// 导入路由组件
import home from './components/home.vue'
import member from './components/member.vue'
import search from './components/search.vue'
import shopcar from './components/shopcar.vue'
import NewList from './components/news/NewList.vue'
import newsInfo from "./components/news/newsInfo.vue"
import photoList from "./components/photos/PhotoList.vue"


// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:home},
    {path:'/member',component:member},
    {path:'/shopcar',component:shopcar},
    {path:'/search',component:search},
    { path:'/home/newslist',component:NewList},
    {path:'/home/newsinfo/:id',component:newsInfo},
    {path:'/home/photolist',component:photoList}
  ],
 linkActiveClass: 'mui-active'
})

// 把路由对象暴露出去
export default router